﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CSE445_Assignment2_ChickenSales
{
    class cOrderProcessing
    {
        //int ccnum;//the credit card number
        bool valid;//will be used to see if the credit card is valid
        double finalCharge;//for the charge function, will be returned
        //check validity of cc# ###### between 111111 and 555555
        public Boolean verifyCredit(long ccnum)
        {
            if ((ccnum <= 555555) && (ccnum >= 111111))
            {
                valid = true;
            }
            else
            {
                valid = false;
            }
            return valid;
        }

        //func charge(unitPrice, numOchickens) ,tax,shipping returns confirmation
        //unitprice*numOchickens + tax + s&h
        public delegate void charger(object[] array);
        
        
    

       public  double charge(double unitPrice, int numOfChick)
        {
            finalCharge = unitPrice * numOfChick;
            finalCharge += (finalCharge * .008);//adding tax to finalCharge
            finalCharge += numOfChick;//shipping and handling; $1 per chicken
            return finalCharge;
        }

    }
}
